import { TASK_PRIORITY, TASK_STATUS, TASK_TYPE } from '@/enums'
import { ButtonColorType } from 'antd/es/button'

export const taskItemTypeConfig = {
  [TASK_TYPE.WORK]: {
    color: '#3a53cc',
    title: '工作'
  },
  [TASK_TYPE.STUDY]: {
    color: '#52c41a',
    title: '学习'
  },
  [TASK_TYPE.LIFE]: {
    color: '#fa8c16',
    title: '生活'
  },
  [TASK_TYPE.FOCUS]: {
    color: '#87e8de',
    title: '专注'
  }
}

export const taskItemPriorityConfig = {
  [TASK_PRIORITY.LOW]: {
    color: 'green',
    title: '低'
  },
  [TASK_PRIORITY.MEDIUM]: {
    color: 'blue',
    title: '中'
  },
  [TASK_PRIORITY.HIGH]: {
    color: 'magenta',
    title: '高'
  }
}
export const taskItemStatusConfig: {
  [key in TASK_STATUS]: {
    color: ButtonColorType
    title: string
  }
} = {
  [TASK_STATUS.NOT_STARTED]: {
    color: 'default',
    title: '未开始'
  },
  [TASK_STATUS.IN_PROGRESS]: {
    color: 'cyan',
    title: '进行中'
  },
  [TASK_STATUS.COMPLETED]: {
    color: 'lime',
    title: '已完成'
  }
}

export const prioritySortOptions = ['none', 'desc', 'asc'] as const
